#include <stdio.h>

int any(char s1[], char s2[]);

int main()
{
    printf("%d\n", any("world", "word"));
    printf("%d\n", any("worldwide", "ide"));
    printf("%d\n", any("yellow", "pink"));
    return 0;
}

int any(char s1[], char s2[])
{
    int i1, i2;

    for (i2 = 0; s2[i2] != '\0'; i2++)
    {
        for (i1 = 0; s1[i1] != '\0'; i1++)
        {
            if (s1[i1] == s2[i2])
            {
                return i1;
            }
        }
    }

    return -1;
}